/**
 * @filename:CapitalTypeServiceImpl 2023-4-20
 * @project Wonder Java前后台分离框架  1.1.0
 * Copyright(c) 2022 Wonder Co. Ltd. 
 * All right reserved. 
 */
package com.wonder.app.service.impl;

import com.wonder.app.domain.CapitalType;
import com.wonder.app.mapper.CapitalTypeDao;
import com.wonder.app.service.CapitalTypeService;
import com.wonder.app.request.CapitalTypeRequest;
import com.wonder.common.utils.StringUtils;
import com.wonder.common.utils.MessageUtils;
import com.wonder.common.common.AjaxResult;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**   
 * @Description:TODO(配资类型服务实现)
 *
 * @version: 1.1.0
 * @author: Wonder
 * 
 */
@Service
public class CapitalTypeServiceImpl  extends ServiceImpl<CapitalTypeDao, CapitalType> implements CapitalTypeService  {

    /**
     * 验证配资类型信息
     * 
     * @param capitalType
     * @param type
     * @return String
     */
    @Override
    public String validate(CapitalType capitalType,String type){
    
    
       return "";
    }
    
    
    /**
	 * Description:配资类型分页返回
	 * @param request //检索条件
	 * @param page //分页参数
	 * @return IPage<CapitalType>   //分页记录
	 */
	@Override 
	public IPage<CapitalType> selectList(CapitalTypeRequest request, Page<CapitalType> page){
	    LambdaQueryWrapper<CapitalType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
	    
	    if (null != request.getId()) {
	       lambdaQueryWrapper.eq(CapitalType::getId, request.getId());
	      }               
             
        
		lambdaQueryWrapper.orderByDesc(CapitalType::getId);	
		Page<CapitalType> selectPage = this.baseMapper.selectPage(page, lambdaQueryWrapper);
		return selectPage;
    }
        
    
	
}